import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/diagram/design/:projectId(\\d+)/:token",
      name: "design",
      component: () => import("../views/webtopo/design/index.vue"),
      meta: {
        requiresAuth: false,
      },
    },{
      path: "/diagram/preview/:projectId(\\d+)/:token",
      name: "preview",
      component: () => import("../views/webtopo/preview/index.vue"),
      meta: {
        requiresAuth: false,
      },
    }
  ],
  scrollBehavior() {
    return { top: 0 };
  },
});
export default router;